<?php
$category  = $this->cruiseCategory;
$paginator = $this->paginator;
?>
<div style="background-color: white; width: 100%; height: auto; overflow: hidden">
    <div class="top-title">
        <div class="content-title">
            <h2><?php echo $category['cruise_category_title']; ?></h2>
        </div>
    </div>

    <div class="span4" id="content-left-2">
        <div class="clear"></div>
        <!-- column left -->
        <?php $columnLeft = $this->columnLeft; ?>
        <?php if($columnLeft): ?>
            <?php foreach($columnLeft as $key => $value): ?>
                <div class="block-left-2" style="margin-left:10px">
        		    <?php if($value['list_cruise']): ?>
                	<div class="block-left-2-title">
                		<h4><?php echo $value['cruise_type_title']; ?></h4>
                	</div>
                	<div class="block-left-2-content" style="margin-left:10px;">
                		<ul>
                		    <!-- cruise -->
                		    <?php foreach($value['list_cruise'] as $k => $v):?>
                		    <?php $url = "/". str_replace(' ', '-' ,trim($category['cruise_category_title'])) . '/'. str_replace(' ', '-' ,trim($v['name'])) . '-' .$v['link_id'] .'.html'; ?>
                			<li class="menu-left">
                				<?php if(isset($v['list_child_cruise']) &&  $v['list_child_cruise']): ?>
	                				<span><?php echo $v['name'];?></span>
                					<ul style="margin-left:10px;">
                					<?php foreach($v['list_child_cruise'] as $childCruise): ?>
                						<?php $urlChild = "/". str_replace(' ', '-' ,trim($category['cruise_category_title'])). '/'. str_replace(' ', '-' ,trim($childCruise['name'])). '-' .$childCruise['link_id'] .'.html'; ?>
                						<li><a href="<?= $urlChild ?>"><?php echo $childCruise['name']; ?></a></li>
                					<?php endforeach; ?>
                					</ul>
                				<?php else: ?>
	                				<a href="<?php echo $url; ?>"><?php echo $v['name'];?></a>
                				<?php endif; ?>
                			</li>
                			<?php endforeach; ?>
                		</ul>
                	</div>
        			<?php endif; ?>
                </div>
        	<?php endforeach; ?>
        <?php endif; ?>
        <!-- end column left -->
        <div class="clear" style="width: 100%; height: 20px;"></div>
    </div>

    <div class="span12" id="content-right-2">
        <?php if($paginator && $category): ?>
    	<div class="content-right-2-title">
    		<h4><?php echo $this->translate($this->titleContent); ?></h4>
    		<div class="clear"><img class="spacer" src="/static/default/images/spacer.gif" /></div>
    	</div>
    	<div class="content-right-2-content">
    	    <?php foreach($paginator as $k => $v): ?>
    	   <?php $url = "/". str_replace(' ', '-' ,trim($category['cruise_category_title'])) . '/'. str_replace(' ', '-' ,trim($v['name'])). '-' .$v['id'] .'.html'; ?>
    		<div class="block-list">
    		    <div class="block-list-title">
                    <a href="<?php echo $url; ?>" title="<?php echo $v['name']; ?>">
                        <?php echo $this->snippet($v['title']); ?>
                    </a>
                </div>
                <div class="block-list-content">
					<a href="<?php echo $url; ?>"><img class="thumbnail" src="<?php echo $v['thumbnail']; ?>" alt="<?php echo $v['name']; ?>" title="<?php echo $v['name']; ?>"/></a>
    				<div class="overview">
    					<?php echo $this->snippet($v['overview'], 150);?>
    				</div>
    				<div class="view-detail">
    				    <a href="<?php echo $url; ?>" class="see-more" title="<?php echo $v['name']; ?>"><?php echo $this->translate('See more >>'); ?></a>
    				</div>
                </div>
    		</div>
    		<?php endforeach; ?>
    	</div>
    	<?php endif; ?>
    	<!--// pagination -->
    	<div style="width: 100%;float:right;margin-right:10px;">
    	    <?php echo ($paginator ? $this->partial("/components/pager/table_pager.phtml",$this) : "");?>
    	</div>
    </div>
</div>